﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="/static/css/table.css" type="text/css">
    <link rel="stylesheet" type="text/css" media="all"
          href="/static/javascript/calendar/calendar-win2k-cold-1.css">
    <script type="text/javascript" src="/static/javascript/calendar/cal.js"></script>
    <script type="text/javascript" src="/static/javascript/comm/comm.js"></script>
    <script type="text/javascript" src="/static/javascript/comm/list.js"></script>
    <script type="text/javascript" src="/static/javascript/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="/static/javascript/calendar-ch.js"></script>
    <script type="text/javascript" src="/static/javascript/comm/time.js"></script>
    <link rel="stylesheet" href="/static/css/cwcalendar.css" type="text/css"></link>

</head>
	<!--以下3个js库必须按照顺序引入-->
	<!--vue脚本库-->
	<script type="text/javascript"
			src="/static/js/vue-3.2.4.global.js">
		<!--axios脚本库-->
	</script>
	<script type="text/javascript"
			src="/static/js/axios-0.18.0.min.js">
	</script>
	<!--我们自己封装的axios函数库 -->
	<script type="text/javascript"
			src="/static/js/axios-helper.js">
	</script>
<body id="app">
	<form name="humanfileForm" method="post" action="register_list.html">
		<table width="100%">
			<tr>
				<td>
					<font color="black">您正在做的业务是：人力资源--调动管理--调动登记查询 </font>
				</td>
			</tr>
			<tr>
				<td align="right">
					<input type="button" value="登记" class="BUTTON_STYLE1" @click="submit()">
				</td>
			</tr>
		</table>
		<input type="hidden" name="page.startPage" value="0">
		<table width="101%" border="1" cellpadding=0 cellspacing=1
			   bordercolorlight=#848284 bordercolordark=#eeeeee
			   class="TABLE_STYLE1">
			<tr class="TR_STYLE1">
				<td width="13%" class="TD_STYLE1">
					请输入员工姓名
				</td>
				<td width="13%" class="TD_STYLE1">
					<input type="text" v-model="majorChange.humanName"/>
				</td>
				<td width="13%" class="TD_STYLE1">
					薪酬标准
				</td>
				<td width="13%" class="TD_STYLE1">
					<input type="text" v-model="majorChange.salaryStandardName"/>
				</td>
			</tr>
			<tr class="TR_STYLE1">
				<td width="13%" class="TD_STYLE1">
					请输入调动原因
				</td>
				<td width="13%" class="TD_STYLE1">
					<input type="text" v-model="majorChange.changeReason"/>
				</td>
			</tr>
			<tr class="TR_STYLE1">
				<td width="13%" class="TD_STYLE1">
					请选择员工所在I级机构
				</td>
				<td width="29%" class="TD_STYLE2">
					<select style="width:160px"  size="1"
							class="SELECT_STYLE2" @change="change()" v-model="configFileSecondKind">
						<option v-for="first in configFileFirstKindList" :value="first">
							{{first.firstKindName}}
						</option>
					</select>
				</td>
				<td width="13%" class="TD_STYLE1">
					请选择员工所在II级机构
				</td>
				<td width="45%" class="TD_STYLE2">
					<select style="width:160px"  size="1"
							class="SELECT_STYLE2" @change="changeSecond()" v-model="configFileThirdKind">
						<option v-for="second in configFileSecondKindList" :value="second">
							{{second.secondKindName}}
						</option>
					</select>
				</td>
				<td width="0%"></td>
			</tr>
			<tr class="TR_STYLE1">
				<td width="13%" class="TD_STYLE1">
					请选择员工所在III级机构
				</td>
				<td width="29%" class="TD_STYLE2">
					<select style="width:160px"  size="1"
							class="SELECT_STYLE2" v-model="fourth">
						<option v-for="third in ConfigFileThirdKindList" :value="third">
							{{third.thirdKindName}}
						</option>
					</select>
				</td>
				<td height="18" class="TD_STYLE1">
					请输入建档时间
				</td>
				<td width="45%" class="TD_STYLE2">
					<input  type="date" class="INPUT_STYLE2"
						   style="width:24% " v-model="dateStart" size="30">
				</td>
			</tr>
		</table>
	</form>
</body>
<script type="module">
	Vue.createApp({
		data(){
			return{
				configFileFirstKindList:[],
				configFileSecondKindList:[],
				ConfigFileThirdKindList:[],
				configFileSecondKind:null,
				configFileThirdKind:null,
				fourth:null,
				dateStart:null,
				//当前调动登记对象
				majorChange:{
					//自增
					mchid:null,
					//一级机构编号
					firstKindId:null,
					//一级机构名称
					firstKindName:null,
					//二级机构编号
					secondKindId:null,
					//二级机构名称
					secondKindName:null,
					//三级机构编号
					thirdKindId:null,
					//三级机构名称
					thirdKindName:null,
					//职位分类编号
					majorKindId:null,
					//职位分类名称
					majorKindName:null,
					//职位编号
					majorId:null,
					//职位名称
					majorName:null,
					//新一级机构编号
					newFirstKindId:null,
					//新一级机构名称
					newFirstKindName:null,
					//新二级机构编号
					newSecondKindId:null,
					//新二级机构名称
					newSecondKindName:null,
					//新三级机构编号
					newThirdKindId:null,
					//新三级机构名称
					newThirdKindName:null,
					//新三级机构名称
					newMajorKindId:null,
					//新职位分类名称
					newMajorKindName:null,
					//新职位编号
					newMajorId:null,
					//新职位名称
					newMajorName:null,
					//人力资源档案编号
					humanId:null,
					//姓名
					humanName:null,
					//薪酬标准编号
					salaryStandardId:null,
					//薪酬标准名称
					salaryStandardName:null,
					//薪酬总额
					salarySum:null,
					//薪酬总额
					newSalaryStandardId:null,
					//新薪酬标准名称
					newSalaryStandardName:null,
					//新薪酬总额
					newSalarySum:null,
					//调动原因
					changeReason:null,
					//复核意见
					checkReason:null,
					//复核通过状态
					checkStatus:null,
					//登记人
					register:null,
					//复核人
					checker:null,
					//复核人
					registTime:null,
					//复核时间
					checkTime:null
				}
			}
		},
		methods:{
			//加载一级结构列表
			loadConfigFileFirstKindList(){
				requestGet("/configFileFirstKind/queryList").then((data)=>{
					console.info(data);
					this.configFileFirstKindList=data;
				})
			},
			change(){
				console.info("configFileSecondKind对象：",this.configFileSecondKind);
				//加载二级机构设置列表
				requestGet("/configFileSecondKind/queryList",{
					firstKindId:this.configFileSecondKind.firstKindId
				}).then((data)=>{
					console.info(data);
					this.configFileSecondKindList=data;
				})

			}
			,
			//查询三级机构设置
			changeSecond(){
				requestGet("/configFileThirdKind/queryList",{
				secondKindId:this.configFileThirdKind.secondKindId
				}).then((data)=>{
					console.info(data);
					this.ConfigFileThirdKindList=data;
				})
			},
			// query(){
			// 	requestGet("/humanFile/queryList",{
			// 		registTime:this.dateStart,
			// 		firstKindId:this.configFileSecondKind.firstKindId,
			// 		secondKindId:this.configFileThirdKind.secondKindId,
			// 		thirdKindId:this.fourth.thirdKindId
			// 	}).then((data)=>{
			// 		// sessionStorage.setItem("data",data);
			// 		console.info(data);
			// 		 window.location.href="/templates/page/transfer/check_list.html"
			// 	})
			// }
			submit(){
				//一级机构编号
				this.majorChange.firstKindId=this.configFileSecondKind.firstKindId,
				//一级机构名称
				this.majorChange.firstKindName=this.configFileSecondKind.firstKindName,
				//二级机构编号
				this.majorChange.secondKindId=this.configFileThirdKind.secondKindId,
				//二级机构名称
				this.majorChange.secondKindName=this.configFileThirdKind.secondKindName,
				//三级机构编号
				this.majorChange.thirdKindId=this.fourth.thirdKindId,
				//三级机构名称
				this.majorChange.thirdKindName=this.fourth.thirdKindName,
				//登记时间
				this.majorChange.registTime=this.dateStart,
				//登记人
				this.majorChange.register=sessionStorage.getItem("u");
				requestPostman("/majorChange/save",this.majorChange).then((data)=>{
					if(data.statusCode==1){
						window.location.href="/templates/page/transfer/register_success.html"
					}else{
						alert("登记失败");
					}
				})
			}
		},
		created(){
			this.loadConfigFileFirstKindList();
		}
	}).mount("#app");
</script>
</html>
		
